<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            background-color: pink;
        }
    </style>
</head>
<body>
    <div>Test</div>

    <script>
        var div = document.querySelector('div');
        div.addEventListener('touchstart', function() {
            console.log('手指触摸元素时触发');
        });

        div.addEventListener('touchmove', function() {
            console.log('手指开始在元素上移动时触发');
        });

        div.addEventListener('touchend', function() {
            console.log('手指从元素上移开时触发');
        });
    </script>
</body>
</html>